const uuid = require('./uuid');
module.exports = {
    id: function() {
        return {
            type: "varchar",
            length: 64,
            primary: true,
            default: uuid()
        }
    },
    string: function( defaultValue = '', columnSize = 255 ) {
        return {
            type: "varchar",
            length: columnSize,
            default: defaultValue,
            nullable: true
        }
    },
    number: function() {
        return {
            type: "int",
            nullable: true
        }
    },
    date: function() {
        return {
            type: "bigint",
            nullable: true
        }
    },
    boolean: function() {
        return {
            type: "tinyint",
            default: false,
            nullable: true
        }
    },
    strings:function() {
        return {    
            type: "simple-array",
            nullable: true
        }
    },
    object:function() {
        return {
            type: "json",
            nullable: true
        }
    },
    objects:function() {
        return {
            type:"json",
            nullable: true
        }
    }
}